package com.rede.didiok.user.modulelist.rank.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rede.didiok.common.dto.rank.MemberCommentDto;
import com.rede.didiok.user.modulelist.rank.entity.MemberCommentEntity;

/**
 * 榜单成员评价表
 * 
 * @author Rede
 * @email didiok@foxmail.com
 * @date 2023-07-20 22:09:24
 */
@Mapper
public interface MemberCommentDao extends BaseMapper<MemberCommentEntity> {


    /**
     * 榜单成员下架操作
     * @param uid
     * @param rejectReason
     * @param auditStatus
     * @return
     */
    Boolean revocationComment(@Param("uid") String uid, @Param("rejectReason") String rejectReason,
                                 @Param("auditStatus") Integer auditStatus);


    /**
     * 根据user_ids 查询用户评论数
     *
     * @param userUids
     * @return
     */
    List<Map<String, String>> getCommentCountByUserIds(@Param("userUids") List<String> userUids);

    /**
     * 根据条件查询评论列表
     * @param page
     * @param comment
     * @return
     */
    Page<MemberCommentEntity> queryPageWithRankMember(Page<MemberCommentEntity> page, @Param("comment") MemberCommentDto comment);
}
